package com.rmy.queue.service.impl;

import java.util.List;
import com.rmy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rmy.queue.mapper.QmsBookingSettingMapper;
import com.rmy.queue.domain.QmsBookingSetting;
import com.rmy.queue.service.IQmsBookingSettingService;

/**
 * 预约配置Service业务层处理
 * 
 * @author rmy
 * @date 2022-10-27
 */
@Service
public class QmsBookingSettingServiceImpl implements IQmsBookingSettingService 
{
    @Autowired
    private QmsBookingSettingMapper qmsBookingSettingMapper;

    /**
     * 查询预约配置
     * 
     * @param id 预约配置主键
     * @return 预约配置
     */
    @Override
    public QmsBookingSetting selectQmsBookingSettingById(Long id)
    {
        return qmsBookingSettingMapper.selectQmsBookingSettingById(id);
    }

    /**
     * 查询预约配置列表
     * 
     * @param qmsBookingSetting 预约配置
     * @return 预约配置
     */
    @Override
    public List<QmsBookingSetting> selectQmsBookingSettingList(QmsBookingSetting qmsBookingSetting)
    {
        return qmsBookingSettingMapper.selectQmsBookingSettingList(qmsBookingSetting);
    }

    /**
     * 新增预约配置
     * 
     * @param qmsBookingSetting 预约配置
     * @return 结果
     */
    @Override
    public int insertQmsBookingSetting(QmsBookingSetting qmsBookingSetting)
    {
        qmsBookingSetting.setCreateTime(DateUtils.getNowDate());
        return qmsBookingSettingMapper.insertQmsBookingSetting(qmsBookingSetting);
    }

    /**
     * 修改预约配置
     * 
     * @param qmsBookingSetting 预约配置
     * @return 结果
     */
    @Override
    public int updateQmsBookingSetting(QmsBookingSetting qmsBookingSetting)
    {
        qmsBookingSetting.setUpdateTime(DateUtils.getNowDate());
        return qmsBookingSettingMapper.updateQmsBookingSetting(qmsBookingSetting);
    }

    /**
     * 批量删除预约配置
     * 
     * @param ids 需要删除的预约配置主键
     * @return 结果
     */
    @Override
    public int deleteQmsBookingSettingByIds(Long[] ids)
    {
        return qmsBookingSettingMapper.deleteQmsBookingSettingByIds(ids);
    }

    /**
     * 删除预约配置信息
     * 
     * @param id 预约配置主键
     * @return 结果
     */
    @Override
    public int deleteQmsBookingSettingById(Long id)
    {
        return qmsBookingSettingMapper.deleteQmsBookingSettingById(id);
    }
}
